@import '../../style/var.less';

.chain-selector {
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  user-select: none;
  background: rgba(134, 151, 255, 0.12);
  border: 0.5px solid var(--r-neutral-line, rgba(255, 255, 255, 0.1));
  border: 1px solid var(--r-neutral-line, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  padding: 8px 4px 8px 8px;
  font-weight: 500;
  max-width: 180px;
  .chain-logo {
    width: 16px;
    height: 16px;
    margin-right: 6px;
  }
  .icon {
    width: 16px;
    height: 16px;
    margin-left: 2px;
  }
}

.hover {
  background: var(--r-blue-light1, #eef1ff);
  border: 1px solid var(--r-blue-default, #7084ff);
}
.chain-selector-options {
  width: 100%;
  max-height: 376px;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  overflow-y: auto;
  &::-webkit-scrollbar {
    display: none !important;
  }
}

.chain-selector__modal.chain-selector__modal {
  .ant-drawer-content-wrapper {
    max-height: calc(100vh - 40px);
    // height: 494px !important;
  }
  header {
    padding-bottom: 16px;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--r-neutral-bg2, #f2f4f7);

    .ant-input-affix-wrapper {
      border: 1px solid var(--r-neutral-line, rgba(255, 255, 255, 0.1));
      background: var(--r-neutral-card-1, rgba(255, 255, 255, 0.06));
      border-radius: 6px;
      height: 44px;
      border-width: 1px;

      input::placeholder {
        color: var(--r-neutral-foot, #6a7587);
      }
    }

    .ant-input-affix-wrapper:focus,
    .ant-input-affix-wrapper-focused {
      border-color: var(--r-blue-default);
    }
  }

  .ant-drawer-close {
    padding-top: 14px;
  }
  .ant-drawer-header {
    padding: 12px 14px;
    background: linear-gradient(
      180deg,
      #eff1ff 0%,
      rgba(238, 234, 255, 0) 111.46%
    );
    border: none;
    .chain-selector-tips {
      font-weight: 400;
      font-size: 12px;
      line-height: 14px;
      color: var(--r-neutral-foot, #6a7587);
      margin-bottom: 2px;
    }
    .chain-selector-site {
      font-weight: 500;
      font-size: 13px;
      line-height: 15px;
      color: var(--r-neutral-title-1, #192945);
    }
  }
  .ant-drawer-body {
    padding-top: 0 !important;
    // position: relative;
    &::-webkit-scrollbar {
      display: none !important;
    }
  }
  .ant-drawer-content {
    border-radius: 16px 16px 0 0;
  }
  .no-pinned-container {
    width: 360px;
    height: 56px;
    background: @color-bg;
    border-radius: 6px;
    font-weight: normal;
    font-size: 12px;
    line-height: 14px;
    text-align: center;
    color: @color-comment-1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
  }
  .cardg {
    background: @color-bg;
  }
  .all-chais {
    width: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    margin-top: 16px;

    span {
      font-style: normal;
      font-weight: normal;
      font-size: 12px;
      line-height: 14px;
      text-align: center;
      color: @color-comment-1;
      cursor: pointer;
    }
  }
  .ant-modal-body {
    max-height: 450px;
  }
  .tip {
    margin-top: 16px;
  }
}

.chain-selector-large-modal {
  .ant-modal-close {
    .ant-modal-close-x {
      height: 52px;
      line-height: 52px;
    }
  }
  .ant-modal-content {
    background: var(--r-neutral-bg2, #f2f4f7);
    box-shadow: 0px 24px 40px 0px rgba(19, 20, 26, 0.25);
    border-radius: 8px;
    border: none;
  }
  .ant-modal-body {
    padding: 0;
    overflow: auto;
    max-height: calc(100vh - 150px) !important;
    height: 600px !important;
    padding-bottom: 20px;
  }
  header {
    padding-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--r-neutral-bg2, #f2f4f7);

    .modal-title {
      color: var(--r-neutral-title1, #192945);
      text-align: center;
      font-size: 20px;
      font-weight: 500;
      line-height: 24px;
      padding-top: 14px;
      padding-bottom: 14px;
    }

    .ant-input-affix-wrapper {
      border: 1px solid var(--r-neutral-line, rgba(255, 255, 255, 0.1));
      background: var(--r-neutral-card-1, rgba(255, 255, 255, 0.06));
      border-radius: 8px;
      height: 44px;
    }

    .ant-input-affix-wrapper:focus,
    .ant-input-affix-wrapper-focused {
      border-color: #b0bdff;
    }
    .ant-input {
      background-color: transparent;
      color: var(--r-neutral-title-1, #192945);
    }
  }
  .ant-drawer-header {
    padding: 12px 20px;
    background: linear-gradient(
      180deg,
      #eff1ff 0%,
      rgba(238, 234, 255, 0) 111.46%
    );
    border: none;
    .chain-selector-tips {
      font-weight: 400;
      font-size: 12px;
      line-height: 14px;
      color: var(--r-neutral-foot, #6a7587);
      margin-bottom: 2px;
    }
    .chain-selector-site {
      font-weight: 500;
      font-size: 13px;
      line-height: 15px;
      color: var(--r-neutral-title-1, #192945);
    }
  }
  // .ant-drawer-body {
  //   position: relative;
  // }
  .chain-selector-large-modal-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .select-chain-list {
    background: var(--r-neutral-card1, #fff);
  }

  .no-pinned-container {
    width: 360px;
    height: 56px;
    background: @color-bg;
    border-radius: 6px;
    font-weight: normal;
    font-size: 12px;
    line-height: 14px;
    text-align: center;
    color: @color-comment-1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
  }
  .cardg {
    background: @color-bg;
  }
  .all-chais {
    width: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    margin-top: 16px;

    span {
      font-style: normal;
      font-weight: normal;
      font-size: 12px;
      line-height: 14px;
      text-align: center;
      color: @color-comment-1;
      cursor: pointer;
    }
  }

  .tip {
    margin-top: 16px;
  }
}

.chain-tag-selector {
  min-width: 116px;
  display: inline-flex;
  height: 40px;
  background: #9ba9fd;
  border-radius: 6px 6px 0px 0px;
  padding: 8px 6px 8px 12px;
  font-size: 12px;
  line-height: 14px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  .chain-tag-selector__name {
    color: #fff;
    font-weight: 500;
    margin-left: 5px;
  }
  .icon-arrow-down {
    path {
      width: 14px;
      height: 14px;
      fill: #fff;
    }
  }
}

.select-chain {
  &-list {
    background: var(--r-neutral-card-1, rgba(255, 255, 255, 0.06));
    border-radius: 8px;
    & + & {
      margin-top: 16px;
    }
  }
  &-item {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 0 16px;
    cursor: pointer;
    border-radius: 8px;
    position: relative;
    border: 1px solid transparent;

    &::after {
      content: '';
      position: absolute;
      bottom: -1px;
      left: -1px;
      right: -1px;
      border-bottom: 0.5px solid var(--r-neutral-line, #e0e5ec);
    }

    .chain-icon-comp {
      img {
        width: 28px;
        height: 28px;
      }
    }

    &-icon {
      width: 24px;
      height: 24px;
      border-radius: 50%;
    }
    &-info {
      margin-left: 12px;
    }
    &-name {
      font-weight: 500;
      font-size: 15px;
      line-height: 18px;
      color: var(--r-neutral-title-1, #192945);
    }
    &-balance {
      color: var(--r-neutral-foot, #6a7587);
      font-size: 12px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
    }
    &-star {
      margin-left: 8px;
      display: none;
    }
    &-checked {
      margin-left: 16px;
    }
    &:not(.select-chain-item-disabled):hover {
      background: var(--r-blue-light-1, #eef1ff);
      border: 1px solid var(--r-blue-default, #7084ff);
      &::after {
        display: none;
      }
      .select-chain-item-star {
        display: block;
      }
    }
    &.select-chain-item-disabled:hover {
      .select-chain-item-star {
        display: block;
      }
    }
    &:last-child::after {
      display: none;
    }
  }
}
